//vue.config.js
const path = require("path");
function resolve(dir) {
    return path.join(__dirname, dir);
}
module.exports = {
    configureWebpack: {
        resolve: {
            alias: {
                '@': resolve('src'),
                'styles': resolve('src/assets/styles'),
                'common': resolve('src/common')
            }
        }
    },
    devServer: {
        proxy: {
            '/api': {
                target: 'https://zyuanyuan.com/qunarApi',
                changeOrigin: true,
                secure: false,
                pathRewrite: {
                    '^/api': '/'
                },
            '/static': {
                target: 'localhost:8080',
                changeOrigin: true,
                secure: false,
                pathRewrite: {
                    '^/static': '/static'
                    }
                }
            }
        }
    }
}